/*
 * @Author: 张小平
 * @Date:   2025-05-01
 * @Email:  qqshuqian@163.com
 * @Copyright © 2024 aseyun. All rights reserved.
 */


export const tableOption = {
  selection: true,
  rowKey: 'tableName',
  border: true,
  index: true,
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  addBtn: false,
  editBtn: false,
  delBtn: false,
  cancelBtn: false,
  saveBtn: false,
  reserveSelection: true,
  searchMenuSpan: 6,
  menuWidth:360,
  searchEnter:true,
  grid: window.isMobile,
  gridSpan: 24,
  column: [

    {
      label: '数据库',
      prop: 'dbName',
      align: 'center'
    },
    {
    label: '表名称',
    prop: 'tableName',
      sortable:"custom",
    align: 'center'

  }, {
    label: '表注释',
    prop: 'tableComment',
      sortable:"custom",
    align: 'center'
  }]
}

/**
 * 表的列属性
 */
export const tableColumnOption = {
  rowKey: 'tableName',
  border: true,
  index: true,
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  menu: false,
  addBtn: false,
  grid: window.isMobile,
  gridSpan: 24,
  searchMenuSpan: 6,
  searchEnter:true,
  column: [{
    label: '字段名',
    prop: 'columnName',
    align: 'center'
  }, {
    label: '注释',
    prop: 'comments',
    align: 'center',
    overHidden: true
  }, {
    label: '字段类型',
    prop: 'columnType',
    align: 'center'
  }, {
    label: 'JAVA类型',
    prop: 'javaType',
    align: 'center'
  }]
}

/**
 * 代码生成
 */
export const tableGenOption = {
  submitBtn: false,
  emptyBtn: false,
  column: [
    // {
    //   label: 'codeId',
    //   prop: 'codeId',
    //   hide:true,
    //   disabled: true
    // },
    {
      label: '数据库',
      prop: 'dbName',
      disabled: true
    },
    // {
    //   label: 'dbCode',
    //   prop: 'dbCode',
    //   hide:true,
    //   disabled: true
    // },
    {
      label: '表名称',
      prop: 'tableComment',
      disabled: true
    },
    {
      label: '表名称',
      prop: 'tableName',
      disabled: true
    },
    {
      label: '包名',
      prop: 'packageName',
      value: 'com.jr'
    },
    {
      label: '模块',
      prop: 'moduleName',
      value: 'demo'
    },
    {
      label: '前端风格',
      prop: 'style',
      type: 'radio',
      slot: true,
      border: true,
      span: 24,
      value:'avue',
      dicData: [{
        label: 'html',
        value: 'html'
      }, {
        label: 'avue',
        value: 'avue'
      }, {
        label: 'element',
        value: 'element'
      }],
    },
    {
      label: '存储方式',
      prop: 'store',
      type: 'radio',
      slot: true,
      border: true,
      span: 24,
      value:'code',
      dicData: [{
        label: '数据库存储',
        value: 'db'
      }, {
        label: '代码文件存储',
        value: 'code'
      }]
    },
    {
      label: '数据库字段命名方式',
      prop: 'camelCase',
      type: 'radio',
      slot: true,
      border: true,
      span: 24,
      value:'0',
      dicData: [{
        label: '下划线',
        value: '1'
      }, {
        label: '驼峰',
        value: '0'
      }],
    },
    {
      label: '前端地址',
      prop: 'projectFront',
      value: "jr-edu-ui-demo"
    },
    {
      label: '后端地址',
      prop: 'projectBack',
      value: "jr-cloud-demo"
    },
    {
      label: '作者',
      prop: 'author',
      value: "张小平"
    },
    {
      label: '应用key',
      prop: 'appKey',
      value: "jr-sys"
    }

  ]
}

